// FiveDice Application. Chris Born, 2007

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <UIKit/UIApplication.h>
#import <UIKit/UIWindow.h>
#import <UIKit/UIView.h>
#import <UIKit/UINavigationBar.h>
#import <UIKit/UINavBarButton.h>
#import <UIKit/UINavigationBarBackground.h>
#import <UIKit/UINavigationItem.h>
#import <UIKit/UIHardware.h>
#import <UIKit/UITransformAnimation.h>
#import <UIKit/UIAnimator.h>
#import <UIKit/UITransitionView.h>
#import <UIKit/UIPushButton.h>
#import <UIKit/CDStructures.h>
#import <UIKit/UITextLabel.h>
#import <UIKit/UIAlertSheet.h>
#import <CoreGraphics/CoreGraphics.h>

#import "WebCore/WebFontCache.h"

// FD Classes
#import "common.h"
#import "FDGameView.h"
#import "FDGameMenuView.h"
#import "FDScoreCardView.h"
#import "FDHighScoresView.h"
#import "FDDiePushButton.h"
#import "FDDefaultsController.h"



@interface FDApplication : UIApplication
{
	struct CGRect 			_contentRect;

	UIWindow				*mainWindow;
	UIView					*mainView;
	FDDefaultsController	*defaults;
	
	UINavigationBar			*navBar;
	UINavigationItem		*navBarTitle;
	
	FDGameMenuView			*gameMenuView;
	FDGameView				*gameView;
	FDScoreCardView			*scoreCardView;
	FDHighScoresView		*highScoresView;
	
	NSString				*title;
	
	int					currentState;
	int					previousState;
}

#pragma mark Handle Current State
- (void)finishUserInterfaceForState:(int)state;

#pragma mark Show and Hide Views
- (void)showGameMenu;
- (void)showGameView;
- (void)startNewGame;
- (void)continueLastGameWithOver:(BOOL)over;

#pragma mark Notification Responders
- (void)scoreCardSelectionChanged:(NSNotification *)notification;
- (void)rolledYahtzee:(NSNotification *)notification;
- (void)changeStateTo:(int)state;

#pragma mark Application Accessors
- (void)setNavBarLeftButton:(NSString *)left withStyle:(int)lstyle rightButton:(NSString *)right withStyle:(int)rstyle;
- (void)setNavBarTitle:(NSString *)newTitle;
- (int)currentState;
- (void)setCurrentState:(int)newCurrentState;
- (int)previousState;
- (void)setPreviousState:(int)newPreviousState;

@end
